[][src]Crate gtk

GTK+ 3 bindings

This library contains safe Rust bindings for GTK+ 3, a multi-platform GUI toolkit. It's a part of Gtk-rs.

The library is a work in progress: expect missing bindings and breaking changes. A steadily increasing share of the code is machine-generated from GObject introspection metadata. The API docs were converted from the upstream ones so until they've all been reviewed there will be incongruities with actual Rust APIs.

See also:

Hello World

extern crate gtk;
use gtk::prelude::*;
use gtk::{ButtonsType, DialogFlags, MessageType, MessageDialog, Window};

fn main() {
    if gtk::init().is_err() {
        println!("Failed to initialize GTK.");
        return;
    }
    MessageDialog::new(None::<&Window>,
                       DialogFlags::empty(),
                       MessageType::Info,
                       ButtonsType::Ok,
                       "Hello World").run();
}

Initialization

GTK+ needs to be initialized before use by calling init or Application::new. You only need to do it once and there is no 'finalize'.

The main loop

In a typical GTK+ application you set up the UI, assign signal handlers and run the main event loop:

extern crate gtk;
extern crate gio;

// To import all needed traits.
use gtk::prelude::*;
use gio::prelude::*;

use std::env;

fn main() {
    let uiapp = gtk::Application::new("org.gtkrsnotes.demo",
                                      gio::ApplicationFlags::FLAGS_NONE)
                                 .expect("Application::new failed");
    uiapp.connect_activate(|app| {
        // We create the main window.
        let win = gtk::ApplicationWindow::new(app);

        // Then we set its size and a title.
        win.set_default_size(320, 200);
        win.set_title("Basic example");

        // Don't forget to make all widgets visible.
        win.show_all();
    });
    uiapp.run(&env::args().collect::<Vec<_>>());
}

Threads

GTK+ is not thread-safe. Accordingly, none of this crate's structs implement Send or Sync.

The thread where init was called is considered the main thread. OS X has its own notion of the main thread and init must be called on that thread. After successful initialization, calling any gtk or gdk functions (including init) from other threads will panic.

Any thread can schedule a closure to be run by the main loop on the main thread via glib::idle_add or glib::timeout_add. This crate has versions of those functions without the Send bound, which may only be called from the main thread: idle_add, timeout_add.

Panics

This and the gdk crate have some run-time safety and contract checks:

  • Any constructor or free function will panic if called before init or on a non-main thread.

  • Any &str or &Path parameter with an interior null (\0) character will cause a panic.

  • Some functions will panic if supplied out-of-range integer parameters. All such cases will be documented individually but they're not yet.

A panic in a closure will abort the process.

Crate features

Library versions

By default this crate provides only GTK+ 3.14 APIs. You can access more modern APIs by selecting one of the following features: v3_14, v3_16, etc.

Cargo.toml example:

[dependencies.gtk]
version = "0.x.y"
features = ["v3_16"]

Take care when choosing the version to target: some of your users might not have easy access to the latest ones. The higher the version, the fewer users will have it installed.

Lgpl-docs

The Gtk-rs crates come with API docs missing because of licensing incompatibilty. You can embed those docs locally via the embed-lgpl-docs feature, e.g.

> cargo doc --features embed-lgpl-docs

Its counterpart purge-lgpl-docs removes those docs regardless of edits.

These features rewrite the crate sources so it's sufficient to enable them once. Omitting them in the following cargo invocations will not undo their effects!

Re-exports

pub use prelude::*;

Modules

functions
prelude

Traits and essential types intended for blanket imports.

xlib

Structs

AboutDialog
AboutDialogClass
AccelFlags
AccelGroup
AccelGroupClass
AccelLabel
AccelLabelClass
ActionBar
ActionBarClass
Actionable
Adjustment
AdjustmentClass
Alignment
AlignmentClass
Allocation
AppChooser
AppChooserButton
AppChooserButtonClass
AppChooserDialog
AppChooserDialogClass
AppChooserWidget
AppChooserWidgetClass
Application
ApplicationClass
ApplicationInhibitFlags
ApplicationWindow
ApplicationWindowClass
Arrow
ArrowClass
AspectFrame
AspectFrameClass
Assistant
AssistantClass
Bin
BinClass
Border
Box
BoxClass
Buildable
Builder
BuilderClass
Button
ButtonBox
ButtonBoxClass
ButtonClass
Calendar
CalendarClass
CalendarDisplayOptions
CellArea
CellAreaBox
CellAreaBoxClass
CellAreaClass
CellAreaContext
CellAreaContextClass
CellEditable
CellLayout
CellRenderer
CellRendererAccel
CellRendererAccelClass
CellRendererClass
CellRendererCombo
CellRendererComboClass
CellRendererPixbuf
CellRendererPixbufClass
CellRendererProgress
CellRendererProgressClass
CellRendererSpin
CellRendererSpinClass
CellRendererSpinner
CellRendererSpinnerClass
CellRendererState
CellRendererText
CellRendererTextClass
CellRendererToggle
CellRendererToggleClass
CellView
CellViewClass
CheckButton
CheckButtonClass
CheckMenuItem
CheckMenuItemClass
Clipboard
ClipboardClass
ColorButton
ColorButtonClass
ColorChooser
ColorChooserDialog
ColorChooserDialogClass
ColorChooserWidget
ColorChooserWidgetClass
ComboBox
ComboBoxClass
ComboBoxText
ComboBoxTextClass
Container
ContainerClass
Continue

Continue calling the closure in the future iterations or drop it.

CssProvider
CssProviderClass
CssSection
DestDefaults
Dialog
DialogClass
DialogFlags
DrawingArea
DrawingAreaClass
Editable
Entry
EntryBuffer
EntryClass
EntryCompletion
EntryCompletionClass
Error

A generic error capable of representing various error domains (types).

EventBox
EventBoxClass
EventController
EventControllerClass
Expander
ExpanderClass
FileChooser
FileChooserButton
FileChooserButtonClass
FileChooserDialog
FileChooserDialogClass
FileChooserWidget
FileChooserWidgetClass
FileFilter
FileFilterClass
FileFilterFlags
Fixed
FixedClass
FlowBox
FlowBoxChild
FlowBoxChildClass
FlowBoxClass
FontButton
FontButtonClass
FontChooser
FontChooserDialog
FontChooserDialogClass
FontChooserLevel
FontChooserWidget
FontChooserWidgetClass
Frame
FrameClass
Gesture
GestureClass
GestureDrag
GestureDragClass
GestureLongPress
GestureLongPressClass
GestureMultiPress
GestureMultiPressClass
GesturePan
GesturePanClass
GestureRotate
GestureRotateClass
GestureSingle
GestureSingleClass
GestureSwipe
GestureSwipeClass
GestureZoom
GestureZoomClass
Grid
GridClass
HeaderBar
HeaderBarClass
IMContext
IMContextClass
IMContextSimple
IMContextSimpleClass
IMMulticontext
IMMulticontextClass
IconFactory
IconFactoryClass
IconInfo
IconInfoClass
IconLookupFlags
IconSet
IconSource
IconTheme
IconThemeClass
IconView
IconViewClass
Image
ImageClass
ImageMenuItem
ImageMenuItemClass
InfoBar
InfoBarClass
Inhibit

Whether to propagate the signal to the default handler.

InputHints
Invisible
InvisibleClass
JunctionSides
LEVEL_BAR_OFFSET_HIGH
LEVEL_BAR_OFFSET_LOW
Label
LabelClass
Layout
LayoutClass
LevelBar
LevelBarClass
LinkButton
LinkButtonClass
ListBox
ListBoxClass
ListBoxRow
ListBoxRowClass
ListStore
ListStoreClass
LockButton
LockButtonClass
Menu
MenuBar
MenuBarClass
MenuButton
MenuButtonClass
MenuClass
MenuItem
MenuItemClass
MenuShell
MenuShellClass
MenuToolButton
MenuToolButtonClass
MessageDialog
MessageDialogClass
Misc
MiscClass
MountOperation
MountOperationClass
Notebook
NotebookClass
Object

The base class in the object hierarchy.

OffscreenWindow
OffscreenWindowClass
Orientable
Overlay
OverlayClass
PAPER_NAME_A3
PAPER_NAME_A4
PAPER_NAME_A5
PAPER_NAME_B5
PAPER_NAME_EXECUTIVE
PAPER_NAME_LEGAL
PAPER_NAME_LETTER
PRINT_SETTINGS_COLLATE
PRINT_SETTINGS_DEFAULT_SOURCE
PRINT_SETTINGS_DITHER
PRINT_SETTINGS_DUPLEX
PRINT_SETTINGS_FINISHINGS
PRINT_SETTINGS_MEDIA_TYPE
PRINT_SETTINGS_NUMBER_UP
PRINT_SETTINGS_NUMBER_UP_LAYOUT
PRINT_SETTINGS_N_COPIES
PRINT_SETTINGS_ORIENTATION
PRINT_SETTINGS_OUTPUT_BASENAME
PRINT_SETTINGS_OUTPUT_BIN
PRINT_SETTINGS_OUTPUT_DIR
PRINT_SETTINGS_OUTPUT_FILE_FORMAT
PRINT_SETTINGS_OUTPUT_URI
PRINT_SETTINGS_PAGE_RANGES
PRINT_SETTINGS_PAGE_SET
PRINT_SETTINGS_PAPER_FORMAT
PRINT_SETTINGS_PAPER_HEIGHT
PRINT_SETTINGS_PAPER_WIDTH
PRINT_SETTINGS_PRINTER
PRINT_SETTINGS_PRINTER_LPI
PRINT_SETTINGS_PRINT_PAGES
PRINT_SETTINGS_QUALITY
PRINT_SETTINGS_RESOLUTION
PRINT_SETTINGS_RESOLUTION_X
PRINT_SETTINGS_RESOLUTION_Y
PRINT_SETTINGS_REVERSE
PRINT_SETTINGS_SCALE
PRINT_SETTINGS_USE_COLOR
PRINT_SETTINGS_WIN32_DRIVER_EXTRA
PRINT_SETTINGS_WIN32_DRIVER_VERSION
PageRange
PageSetup
PageSetupClass
Paned
PanedClass
PaperSize
PlacesOpenFlags
PlacesSidebar
PlacesSidebarClass
Plug
PlugClass
Popover
PopoverClass
PrintContext
PrintContextClass
PrintOperation
PrintOperationClass
PrintOperationPreview
PrintSettings
PrintSettingsClass
ProgressBar
ProgressBarClass
RadioButton
RadioButtonClass
RadioMenuItem
RadioMenuItemClass
RadioToolButton
RadioToolButtonClass
Range
RangeClass
RecentChooser
RecentChooserDialog
RecentChooserDialogClass
RecentChooserMenu
RecentChooserMenuClass
RecentChooserWidget
RecentChooserWidgetClass
RecentData
RecentFilter
RecentFilterClass
RecentFilterFlags
RecentInfo
RecentManager
RecentManagerClass
Rectangle
RegionFlags
Requisition
Revealer
RevealerClass
STYLE_CLASS_ACCELERATOR
STYLE_CLASS_ARROW
STYLE_CLASS_BACKGROUND
STYLE_CLASS_BOTTOM
STYLE_CLASS_BUTTON
STYLE_CLASS_CALENDAR
STYLE_CLASS_CELL
STYLE_CLASS_CHECK
STYLE_CLASS_COMBOBOX_ENTRY
STYLE_CLASS_CONTEXT_MENU
STYLE_CLASS_CSD
STYLE_CLASS_CURSOR_HANDLE
STYLE_CLASS_DEFAULT
STYLE_CLASS_DESTRUCTIVE_ACTION
STYLE_CLASS_DIM_LABEL
STYLE_CLASS_DND
STYLE_CLASS_DOCK
STYLE_CLASS_ENTRY
STYLE_CLASS_ERROR
STYLE_CLASS_EXPANDER
STYLE_CLASS_FLAT
STYLE_CLASS_FRAME
STYLE_CLASS_GRIP
STYLE_CLASS_HEADER
STYLE_CLASS_HIGHLIGHT
STYLE_CLASS_HORIZONTAL
STYLE_CLASS_IMAGE
STYLE_CLASS_INFO
STYLE_CLASS_INLINE_TOOLBAR
STYLE_CLASS_INSERTION_CURSOR
STYLE_CLASS_LEFT
STYLE_CLASS_LEVEL_BAR
STYLE_CLASS_LINKED
STYLE_CLASS_LIST
STYLE_CLASS_LIST_ROW
STYLE_CLASS_MARK
STYLE_CLASS_MENU
STYLE_CLASS_MENUBAR
STYLE_CLASS_MENUITEM
STYLE_CLASS_MESSAGE_DIALOG
STYLE_CLASS_NEEDS_ATTENTION
STYLE_CLASS_NOTEBOOK
STYLE_CLASS_OSD
STYLE_CLASS_OVERSHOOT
STYLE_CLASS_PANE_SEPARATOR
STYLE_CLASS_POPOVER
STYLE_CLASS_POPUP
STYLE_CLASS_PRIMARY_TOOLBAR
STYLE_CLASS_PROGRESSBAR
STYLE_CLASS_PULSE
STYLE_CLASS_QUESTION
STYLE_CLASS_RADIO
STYLE_CLASS_RAISED
STYLE_CLASS_READ_ONLY
STYLE_CLASS_RIGHT
STYLE_CLASS_RUBBERBAND
STYLE_CLASS_SCALE
STYLE_CLASS_SCALE_HAS_MARKS_ABOVE
STYLE_CLASS_SCALE_HAS_MARKS_BELOW
STYLE_CLASS_SCROLLBAR
STYLE_CLASS_SCROLLBARS_JUNCTION
STYLE_CLASS_SEPARATOR
STYLE_CLASS_SIDEBAR
STYLE_CLASS_SLIDER
STYLE_CLASS_SPINBUTTON
STYLE_CLASS_SPINNER
STYLE_CLASS_SUBTITLE
STYLE_CLASS_SUGGESTED_ACTION
STYLE_CLASS_TITLE
STYLE_CLASS_TITLEBAR
STYLE_CLASS_TOOLBAR
STYLE_CLASS_TOOLTIP
STYLE_CLASS_TOP
STYLE_CLASS_TROUGH
STYLE_CLASS_VERTICAL
STYLE_CLASS_VIEW
STYLE_CLASS_WARNING
STYLE_PROPERTY_BACKGROUND_COLOR
STYLE_PROPERTY_BACKGROUND_IMAGE
STYLE_PROPERTY_BORDER_COLOR
STYLE_PROPERTY_BORDER_RADIUS
STYLE_PROPERTY_BORDER_STYLE
STYLE_PROPERTY_BORDER_WIDTH
STYLE_PROPERTY_COLOR
STYLE_PROPERTY_FONT
STYLE_PROPERTY_MARGIN
STYLE_PROPERTY_PADDING
STYLE_REGION_COLUMN
STYLE_REGION_COLUMN_HEADER
STYLE_REGION_ROW
STYLE_REGION_TAB
Scale
ScaleButton
ScaleButtonClass
ScaleClass
Scrollable
Scrollbar
ScrollbarClass
ScrolledWindow
ScrolledWindowClass
SearchBar
SearchBarClass
SearchEntry
SearchEntryClass
SelectionData
Separator
SeparatorClass
SeparatorMenuItem
SeparatorMenuItemClass
SeparatorToolItem
SeparatorToolItemClass
Settings
SettingsClass
SizeGroup
SizeGroupClass
Socket
SocketClass
SpinButton
SpinButtonClass
Spinner
SpinnerClass
Stack
StackClass
StackSwitcher
StackSwitcherClass
StateFlags
StatusIcon
StatusIconClass
Statusbar
StatusbarClass
StyleContext
StyleContextClass
StyleProperties
StylePropertiesClass
StyleProvider
Switch
SwitchClass
SymbolicColor
TargetEntry
TargetFlags
TargetList
TextAttributes
TextBuffer
TextBufferClass
TextChildAnchor
TextChildAnchorClass
TextIter
TextMark
TextMarkClass
TextSearchFlags
TextTag
TextTagClass
TextTagTable
TextTagTableClass
TextView
TextViewClass
ToggleButton
ToggleButtonClass
ToggleToolButton
ToggleToolButtonClass
ToolButton
ToolButtonClass
ToolItem
ToolItemClass
ToolItemGroup
ToolItemGroupClass
ToolPalette
ToolPaletteClass
ToolPaletteDragTargets
ToolShell
Toolbar
ToolbarClass
Tooltip
TooltipClass
TreeDragDest
TreeDragSource
TreeIter
TreeModel
TreeModelFilter
TreeModelFilterClass
TreeModelFlags
TreeModelSort
TreeModelSortClass
TreePath
TreeRowReference
TreeSelection
TreeSelectionClass
TreeSortable
TreeStore
TreeStoreClass
TreeView
TreeViewClass
TreeViewColumn
TreeViewColumnClass
TypedValue

A statically typed Value.

Value

A generic value capable of carrying various types.

Viewport
ViewportClass
VolumeButton
VolumeButtonClass
Widget
WidgetClass
WidgetPath
Window
WindowClass
WindowGroup
WindowGroupClass

Enums

Align
ArrowType
AssistantPageType
BaselinePosition
BorderStyle
BuilderError
ButtonBoxStyle
ButtonsType
CellRendererAccelMode
CellRendererMode
CornerType
CssProviderError
CssSectionType
DeleteType
DirectionType
DragResult
EntryIconPosition
EventSequenceState
FileChooserAction
FileChooserConfirmation
FileChooserError
IMPreeditStyleDeprecated
IMStatusStyleDeprecated
IconSize
IconThemeError
IconViewDropPosition
ImageType
InputPurpose
Justification
LevelBarMode
License
MenuDirectionType
MessageType
MovementStep
NotebookTab
NumberUpLayout
Orientation
PackDirection
PackType
PageOrientation
PageSet
PanDirection
PolicyType
PositionType
PrintDuplex
PrintError
PrintOperationAction
PrintOperationResult
PrintPages
PrintQuality
PrintStatus
PropagationPhase
RecentChooserError
RecentManagerError
RecentSortType
ReliefStyle
ResizeMode
ResponseType
RevealerTransitionType
ScrollStep
ScrollType
ScrollablePolicy
SelectionMode
SensitivityType
ShadowType
SizeGroupMode
SizeRequestMode
SortColumn
SortType
SpinButtonUpdatePolicy
SpinType
StackTransitionType
StateTypeDeprecated
TextDirection
TextViewLayer
TextWindowType
ToolbarStyle
TreeViewColumnSizing
TreeViewDropPosition
TreeViewGridLines
Type

A GLib or GLib-based library type

Unit
WidgetHelpType
WindowPosition
WindowType
WrapMode

Constants

NONE_ABOUT_DIALOG
NONE_ACCEL_GROUP
NONE_ACCEL_LABEL
NONE_ACTIONABLE
NONE_ACTION_BAR
NONE_ADJUSTMENT
NONE_ALIGNMENT
NONE_APPLICATION
NONE_APPLICATION_WINDOW
NONE_APP_CHOOSER_BUTTON
NONE_APP_CHOOSER_DIALOG
NONE_APP_CHOOSER_WIDGET
NONE_ARROW
NONE_ASPECT_FRAME
NONE_ASSISTANT
NONE_BIN
NONE_BOX
NONE_BUILDABLE
NONE_BUILDER
NONE_BUTTON
NONE_BUTTON_BOX
NONE_CALENDAR
NONE_CELL_AREA
NONE_CELL_AREA_BOX
NONE_CELL_AREA_CONTEXT
NONE_CELL_EDITABLE
NONE_CELL_LAYOUT
NONE_CELL_RENDERER
NONE_CELL_RENDERER_ACCEL
NONE_CELL_RENDERER_COMBO
NONE_CELL_RENDERER_PIXBUF
NONE_CELL_RENDERER_PROGRESS
NONE_CELL_RENDERER_SPIN
NONE_CELL_RENDERER_SPINNER
NONE_CELL_RENDERER_TEXT
NONE_CELL_RENDERER_TOGGLE
NONE_CELL_VIEW
NONE_CHECK_BUTTON
NONE_CHECK_MENU_ITEM
NONE_COLOR_BUTTON
NONE_COLOR_CHOOSER
NONE_COLOR_CHOOSER_DIALOG
NONE_COLOR_CHOOSER_WIDGET
NONE_COMBO_BOX
NONE_COMBO_BOX_TEXT
NONE_CONTAINER
NONE_CSS_PROVIDER
NONE_DIALOG
NONE_DRAWING_AREA
NONE_EDITABLE
NONE_ENTRY
NONE_ENTRY_COMPLETION
NONE_EVENT_BOX
NONE_EVENT_CONTROLLER
NONE_EXPANDER
NONE_FILE_CHOOSER
NONE_FILE_CHOOSER_BUTTON
NONE_FILE_CHOOSER_DIALOG
NONE_FILE_CHOOSER_WIDGET
NONE_FIXED
NONE_FLOW_BOX
NONE_FLOW_BOX_CHILD
NONE_FONT_BUTTON
NONE_FONT_CHOOSER
NONE_FONT_CHOOSER_DIALOG
NONE_FONT_CHOOSER_WIDGET
NONE_FRAME
NONE_GESTURE
NONE_GESTURE_DRAG
NONE_GESTURE_LONG_PRESS
NONE_GESTURE_MULTI_PRESS
NONE_GESTURE_PAN
NONE_GESTURE_ROTATE
NONE_GESTURE_SINGLE
NONE_GESTURE_SWIPE
NONE_GESTURE_ZOOM
NONE_GRID
NONE_HEADER_BAR
NONE_ICON_FACTORY
NONE_ICON_INFO
NONE_ICON_THEME
NONE_ICON_VIEW
NONE_IMAGE
NONE_IMAGE_MENU_ITEM
NONE_IM_CONTEXT
NONE_IM_CONTEXT_SIMPLE
NONE_IM_MULTICONTEXT
NONE_INFO_BAR
NONE_INVISIBLE
NONE_LABEL
NONE_LAYOUT
NONE_LEVEL_BAR
NONE_LINK_BUTTON
NONE_LIST_BOX
NONE_LIST_BOX_ROW
NONE_LIST_STORE
NONE_LOCK_BUTTON
NONE_MENU
NONE_MENU_BAR
NONE_MENU_BUTTON
NONE_MENU_ITEM
NONE_MENU_SHELL
NONE_MENU_TOOL_BUTTON
NONE_MESSAGE_DIALOG
NONE_MISC
NONE_MOUNT_OPERATION
NONE_NOTEBOOK
NONE_OFFSCREEN_WINDOW
NONE_ORIENTABLE
NONE_OVERLAY
NONE_PANED
NONE_PLACES_SIDEBAR
NONE_PLUG
NONE_POPOVER
NONE_PRINT_OPERATION
NONE_PRINT_OPERATION_PREVIEW
NONE_PROGRESS_BAR
NONE_RADIO_BUTTON
NONE_RADIO_MENU_ITEM
NONE_RADIO_TOOL_BUTTON
NONE_RANGE
NONE_RECENT_CHOOSER
NONE_RECENT_CHOOSER_DIALOG
NONE_RECENT_CHOOSER_MENU
NONE_RECENT_CHOOSER_WIDGET
NONE_RECENT_MANAGER
NONE_REVEALER
NONE_SCALE
NONE_SCALE_BUTTON
NONE_SCROLLABLE
NONE_SCROLLBAR
NONE_SCROLLED_WINDOW
NONE_SEARCH_BAR
NONE_SEARCH_ENTRY
NONE_SEPARATOR
NONE_SEPARATOR_MENU_ITEM
NONE_SEPARATOR_TOOL_ITEM
NONE_SETTINGS
NONE_SIZE_GROUP
NONE_SOCKET
NONE_SPINNER
NONE_SPIN_BUTTON
NONE_STACK
NONE_STACK_SWITCHER
NONE_STATUSBAR
NONE_STATUS_ICON
NONE_STYLE_CONTEXT
NONE_STYLE_PROPERTIES
NONE_STYLE_PROVIDER
NONE_SWITCH
NONE_TEXT_BUFFER
NONE_TEXT_CHILD_ANCHOR
NONE_TEXT_MARK
NONE_TEXT_TAG
NONE_TEXT_TAG_TABLE
NONE_TEXT_VIEW
NONE_TOGGLE_BUTTON
NONE_TOGGLE_TOOL_BUTTON
NONE_TOOLBAR
NONE_TOOL_BUTTON
NONE_TOOL_ITEM
NONE_TOOL_ITEM_GROUP
NONE_TOOL_PALETTE
NONE_TOOL_SHELL
NONE_TREE_DRAG_DEST
NONE_TREE_DRAG_SOURCE
NONE_TREE_MODEL
NONE_TREE_MODEL_FILTER
NONE_TREE_MODEL_SORT
NONE_TREE_SELECTION
NONE_TREE_SORTABLE
NONE_TREE_STORE
NONE_TREE_VIEW
NONE_TREE_VIEW_COLUMN
NONE_VIEWPORT
NONE_VOLUME_BUTTON
NONE_WIDGET
NONE_WINDOW
NONE_WINDOW_GROUP
STYLE_PROVIDER_PRIORITY_APPLICATION
STYLE_PROVIDER_PRIORITY_FALLBACK
STYLE_PROVIDER_PRIORITY_SETTINGS
STYLE_PROVIDER_PRIORITY_THEME
STYLE_PROVIDER_PRIORITY_USER

Traits

AboutDialogExt
AccelGroupExt
AccelLabelExt
ActionBarExt
ActionableExt
AdjustmentExt
AppChooserButtonExt
AppChooserDialogExt
AppChooserWidgetExt
ApplicationWindowExt
ArrowExt
AspectFrameExt
AssistantExt
BinExt
BoxExt
BuildableExt
BuilderExt
ButtonBoxExt
ButtonExt
CalendarExt
Cast

Upcasting and downcasting support.

CellAreaBoxExt
CellAreaContextExt
CellAreaExt
CellEditableExt
CellLayoutExt
CellRendererAccelExt
CellRendererComboExt
CellRendererExt
CellRendererPixbufExt
CellRendererProgressExt
CellRendererSpinExt
CellRendererSpinnerExt
CellRendererTextExt
CellRendererToggleExt
CellViewExt
CheckMenuItemExt
ColorButtonExt
ColorChooserDialogExt
ColorChooserExt
ColorChooserWidgetExt
ComboBoxExt
ComboBoxTextExt
ContainerExt
CssProviderExt
DialogExt
EditableExt
EditableSignals
EntryCompletionExt
EntryExt
EventBoxExt
EventControllerExt
ExpanderExt
FileChooserButtonExt
FileChooserExt
FileChooserWidgetExt
FixedExt
FlowBoxChildExt
FlowBoxExt
FontButtonExt
FontChooserExt
FontChooserWidgetExt
FrameExt
GestureDragExt
GestureExt
GestureLongPressExt
GestureMultiPressExt
GesturePanExt
GestureRotateExt
GestureSingleExt
GestureSwipeExt
GestureZoomExt
GridExt
GtkApplicationExt
GtkListStoreExt
GtkMenuExt
GtkMenuItemExt
GtkSocketExt
GtkWindowExt
HeaderBarExt
IMContextExt
IMMulticontextExt
IconInfoExt
IconThemeExt
IconViewExt
ImageExt
InfoBarExt
InvisibleExt
IsA

Declares the "is a" relationship.

LabelExt
LayoutExt
LevelBarExt
LinkButtonExt
ListBoxExt
ListBoxRowExt
LockButtonExt
MenuBarExt
MenuButtonExt
MenuShellExt
MenuToolButtonExt
MessageDialogExt
MountOperationExt
NotebookExt
OffscreenWindowExt
OrientableExt
OverlayExt
OverlaySignals
PanedExt
PlacesSidebarExt
PlugExt
PopoverExt
PrintOperationExt
PrintOperationPreviewExt
ProgressBarExt
RadioButtonExt
RadioMenuItemExt
RadioToolButtonExt
RangeExt
RecentChooserExt
RecentChooserMenuExt
RecentManagerExt
RevealerExt
ScaleButtonExt
ScaleExt
ScrollableExt
ScrolledWindowExt
SearchBarExt
SearchEntryExt
SeparatorToolItemExt
SettingsExt
SizeGroupExt
SpinButtonExt
SpinButtonSignals
SpinnerExt
StackExt
StackSwitcherExt
StaticType

Types that are supported by GLib dynamic typing.

StatusIconExt
StatusbarExt
StyleContextExt
StylePropertiesExt
StyleProviderExt
SwitchExt
TextBufferExt
TextChildAnchorExt
TextMarkExt
TextTagExt
TextTagTableExt
TextViewExt
ToValue

Converts to Value.

ToggleButtonExt
ToggleToolButtonExt
ToolButtonExt
ToolItemExt
ToolItemGroupExt
ToolPaletteExt
ToolShellExt
ToolbarExt
TreeDragDestExt
TreeDragSourceExt
TreeModelExt
TreeModelFilterExt
TreeModelSortExt
TreeSelectionExt
TreeSortableExt
TreeStoreExt
TreeViewColumnExt
TreeViewExt
ViewportExt
VolumeButtonExt
WidgetExt
WindowGroupExt

Functions

accel_groups_activate
accel_groups_from_object
accelerator_get_default_mod_mask
accelerator_get_label
accelerator_get_label_with_keycode
accelerator_name
accelerator_name_with_keycode
accelerator_parse
accelerator_set_default_mod_mask
accelerator_valid
bindings_activate
bindings_activate_event
cairo_should_draw_window
cairo_transform_to_window
check_version
device_grab_add
device_grab_remove
disable_setlocale
events_pending
false_
get_binary_age
get_current_event
get_current_event_device
get_current_event_state
get_current_event_time
get_debug_flags
get_default_language
get_event_widget
get_interface_age
get_locale_direction
get_major_version
get_micro_version
get_minor_version
grab_get_current
idle_add

Adds a closure to be called by the default main loop when it's idle.

init

Tries to initialize GTK+.

is_initialized

Returns true if GTK has been initialized.

is_initialized_main_thread

Returns true if GTK has been initialized and this is the main thread.

main
main_do_event
main_iteration
main_iteration_do
main_level
main_quit
print_run_page_setup_dialog
print_run_page_setup_dialog_async
propagate_event
render_activity
render_arrow
render_background
render_check
render_expander
render_extension
render_focus
render_frame
render_frame_gap
render_handle
render_icon
render_icon_surface
render_insertion_cursor
render_layout
render_line
render_option
render_slider
rgb_to_hsv
selection_add_target
selection_clear_targets
selection_convert
selection_owner_set
selection_owner_set_for_display
selection_remove_all
set_debug_flags
set_initialized

Informs this crate that GTK has been initialized and the current thread is the main one.

show_uri
targets_include_image
targets_include_rich_text
targets_include_text
targets_include_uri
test_create_simple_window
test_find_label
test_find_sibling
test_find_widget
test_register_all_types
test_slider_get_value
test_slider_set_perc
test_spin_button_click
test_text_get
test_text_set
test_widget_click
test_widget_send_key
test_widget_wait_for_draw
timeout_add

Adds a closure to be called by the default main loop at regular intervals with millisecond granularity.

timeout_add_seconds

Adds a closure to be called by the default main loop at regular intervals with second granularity.

tree_get_row_drag_data
tree_set_row_drag_data
true_